//
//  WebController.m
//  BeautyClother
//
//  Created by dllo on 15/10/9.
//  Copyright (c) 2015年 宋爽. All rights reserved.
//

#import "WebController.h"

@interface WebController ()<UIWebViewDelegate>
@property (nonatomic, retain) UIActivityIndicatorView *activity;
@property (nonatomic, assign) CGFloat offHeigt;
@property (nonatomic, assign) CGFloat offWidth;

@end

@implementation WebController

- (void)dealloc
{
    [_activity release];
    [super dealloc];
    
}

- (instancetype)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        
    }
    return self;
    
}


- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.view.backgroundColor = [UIColor whiteColor];
    [self createWebView];
    self.offHeigt = [[UIScreen mainScreen]bounds].size.height / 667;
    self.offWidth = [[UIScreen mainScreen]bounds].size.width / 375;
    
    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc]initWithImage:[UIImage imageNamed:@"f.png"] style:UIBarButtonItemStyleDone target:self action:@selector(back:)];
    self.navigationItem.leftBarButtonItem.tintColor = [UIColor darkGrayColor];
    
}

- (void)back:(id)sender
{
    [self.navigationController popViewControllerAnimated:YES];
}

- (void)createWebView
{
    UIWebView *web = [[UIWebView alloc]initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height )];
    [self.view addSubview:web];
    web.delegate = self;
    NSURLRequest *request = [NSURLRequest requestWithURL:self.url];
    [web loadRequest:request];
    
    [web release];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
